const schoolStore = createSlice({
  name: school,
  initialState: {
    teacherList: [],
    studentList: [],
    timetable: [],
    teacherInfo: {},
  },
  reducers: {
    setTeacherList(state, action) {
      state.teacherList = action.payload;
    },
    setStudentList(state, action) {
      state.studentList = action.payload;
    },
    setTimetable(state, action) {
      state.timetable = action.payload;
    },
    setTeacherInfo(state, action) {
      state.teacherInfo = action.payload;
    },
  },
});
const { setTeacherList, setStudentList, setTimetable, setTeacherInfo } =
  schoolStore.actions;
const reducer = schoolStore.reducer;
export { setTeacherList, setStudentList, setTimetable, setTeacherInfo };
export default reducer;
